package ch05.home;

class Exercise5_06 {
	public static void main(String[] args) {
		int[] coinUnit = { 500, 100, 50, 10 };
		int money = 2680;
		
		System.out.println("money=" + money);		
		for (int i = 0; i < coinUnit.length; i++) {
			//<1
			System.out.println(coinUnit[i] + "원: " + money / coinUnit[i]);
			money = money % coinUnit[i];
			//1>
		}
	}
}
/*
money=2680
500원: 5
100원: 1
50원: 1
10원: 3
*/